<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Vue</title>
    <script src="https://unpkg.com/vue/dist/vue.js"></script>
</head>
<body>

<div id="app">
    循环语句<br/>
    1.遍历对象数组<br/>
    <li v-for="(s,index) in sites">{{s.name}} : {{index}}</li>
    2.遍历对象<br/>
    <li v-for="(value,key,index) in obj">值是：{{value}},键是：{{key}},索引是：{{index}}</li>
    3.遍历数字<br/>
    <li v-for="n in 10">{{n}}</li>
</div>

<script>
    let v = new Vue({
        el: '#app',
        data: {
            sites: [
                {name:'AAA'},
                {name:'BBB'},
                {name:'CCC'},
                {name:'DDD'}],
            obj:{
                id:'1',
                name:'zhangfei',
                gender:'男'
            }
        }
    });
</script>

</body>
</html>